package com.augurit.wf.client.agency.service;

import java.util.List;

import org.jbpm.pvm.internal.task.TaskImpl;
import org.springside.modules.orm.Page;

import com.augurit.common.base.service.ICrudService;
import com.augurit.common.system.web.org.form.OmUserForm;
import com.augurit.wf.client.agency.web.form.WfAgencyForm;
import com.augurit.wf.common.entity.WfAgency;

public interface IWfAgencyService extends ICrudService<WfAgencyForm, Long> {
	/**
	 * 保存代理及代理细节
	 * @param form
	 */
	boolean saveAgentAndDetails(WfAgencyForm form);
	
	/**
	 * 获取系统中所有的用户
	 * @page 分页参数
	 * @form 查询条件
	 * @return Page 对象
	 */
	Page<OmUserForm> getAllUsers(Page<OmUserForm> page, OmUserForm form);
	
	/**
	 * 删除代理信息并更新Jbpm4Task表
	 * @param ids
	 */
	void deleteAndUpdateJbpm4TaskTable(Long[] ids);	
	
	public WfAgencyForm getAgentByTask(TaskImpl taskImpl);
	
	public WfAgency getAgentByJbpm4Task(String wfDefId,String assignee);
	
	//根据代理人获取委托人列表
	public List<String> getPrincipalsByAgent(String agent);
}